<?xml version="1.0" encoding="UTF-8" ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core" >
 
    <h:head>
        <title>SGDE-e</title>
        
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        
        <link type="text/css" rel="stylesheet" href="#{facesContext.externalContext.requestContextPath}/resources/css/default.css"/>
        <link type="text/css" rel="stylesheet" href="#{facesContext.externalContext.requestContextPath}/resources/css/sgde.styles.css"/>
        <link type="text/css" rel="stylesheet" href="#{facesContext.externalContext.requestContextPath}/resources/css/syntaxhighlighter.css"/>
		<h:outputScript     library="primefaces" name="jquery/jquery.js" target="head"/>
		<h:outputScript     library="js" name="modal.js" target="head"/>
		<h:outputScript     library="js" name="locale-primefaces.js" target="head"/>
		<h:outputScript     library="js" name="maskInput.js" target="head"/>
		<script type="text/javascript" src="#{facesContext.externalContext.requestContextPath}/resources/js/primefaces.js" ></script>
		
		
        <ui:insert name="styles">
        
        </ui:insert>
        
        <ui:insert name="scripts">
        
        </ui:insert>
        
    </h:head>
    <h:body>
    
	    <div id="container">
	    
	    	<p:panel id="cabecalho" >
	    		
	    		<table style="width: 100%; margin-left: 0%" >
	    			
	    			<tr>
						<td style="width: 80%">
							
							<h1>
				    			SGDE-e
				    		</h1>
							
						</td>
						
						<td nowrap="nowrap" style="width: 20%">
						
							<p:panel style="width:270px;" > 
				    			<h:outputText value="#{pessoaLoginMB.pessoaLogada.nome}" />, 
				    			<h:outputText value="#{pessoaLoginMB.pessoaLogada.nivelAcesso.nome}" />
				    			<h:form>
				    				<p:commandLink action="#{pessoaLoginMB.comandoLogout}" value="Sair" />
				    			</h:form>
				    		</p:panel>
						</td>
					</tr>
					
	    		</table>
	    	
	    	</p:panel>
	    	
	    	<h:form>
	    	
	    		<p:menubar id="menuSistema" style="padding-left:50px;">
	    	
	    			<p:submenu label="Entidades" icon="ui-icon-contact">
	    			
						<p:menuitem value="Cadastrar Entidade" url="#" />
						
						<p:menuitem value="Listar Entidades" url="#" />
						
	    			</p:submenu>
	    	
	    			<p:submenu label="Pessoas" icon="ui-icon-contact">
	    			
						<p:menuitem value="Cadastrar Pessoas" url="#" />
						
						<p:menuitem value="Listar Pessoas" action="listarPessoas" />
						
	    			</p:submenu>
						
				</p:menubar>
			
			</h:form>


	    	<p:panel styleClass="painelPrincipal">
	    	
	    		<ui:insert name="principal">
	    			principal
	    		</ui:insert>
	    	
	    	</p:panel>
	        
	        
	        <p:panel id="footer" style="heigth:20px !important;" >
	        			Bruno Augusto  -  SGDE-e
	        </p:panel>
	        
	        
	        <p:dialog id="modalDialog" 
		   		closable="false" 
		   		widgetVar="dlg2" 
		   		modal="true" 
		   		resizable="false"
		   		height="100"
		   		draggable="false" >  
				<p:ajaxStatus id="ajaxStatusPanel" onstart="dlg2.show(); return false;" oncomplete="dlg2.hide(); return false;" />  
				
	        		<p align="center" style="font-weight:bold;">
						<h:graphicImage value="/resources/img/loading.png"/>
						
						<br />
						
						<p:spacer height="20" />
						
						Processando, Aguarde...
					</p> 
		  	</p:dialog>
	        
        </div>
        
    </h:body>
</html>